#ifndef CBASEMESH_H__

#include "IRenderable.h"
#include <d3dx9.h>
#include <d3d9.h>
#include <string>
#include "..\\Util\\CErrorLogger.h"
#include "..\\GameCore\\CCore.h"
#include "..\\Util\\Common.h"

namespace Content
{

class CBaseMesh
{
public:
	CBaseMesh(const std::string&);
	void render(void);
	void onLostDevice(void);
	void onResetDevice(void);

	void clean(void);
	HRESULT init(void);

	virtual ~CBaseMesh();
	
	
	const D3DXMATRIX& getWorldMat();

private:
	const std::string meshFile;
	DWORD materialCnt;

	LPD3DXMESH pMesh;

	LPDIRECT3DDEVICE9 pD3DDevice;

};

}//Content



#define CBASEMESH_H__
#endif 